//导入获取元素尺寸的模板
import {gitElewidth,gitEleHeight} from '../modules/getEleSize'
//导入计算元素面积的模板
import calcArea from '../modules/calcMeasureArea';

const btnCalcBox1 = document.gitElementById('btnCalcBox1');
btnCalcBox1.onclick =function(){
    const width = gitElewidth('#box1');
    const height = gitEleHeight('#box1');
    //计算模板方法计算出元素面积
    calcArea(width,height);
}

const btnCalcBox2 = document.gitElementById('btnCalcBox2');
btnCalcBox2.onclick = function(){
    const width = gitElewidth('#box2');
    const height = gitEleHeight('#box2');
    //计算模板方法计算出元素面积
    calcArea(width,height);
}